package com.shengqi.xinnongren.work.ui.user.model;

import java.util.ArrayList;
import java.util.List;

public class CommentGoodsModel {


    private String comId;
    private String comName;
    private String date;
    private String mainPic;

    private String goodsComment = "";
    private float goodScore = 5f;
    private boolean isAnonymous;

    private List<String> pics = new ArrayList<>();
    private List<String> savePics = new ArrayList<>();

    public CommentGoodsModel() {
//        comName = String.valueOf((char) (65 + Math.random() * 40));
    }

    public void addPic(String pic) {
        pics.add(pic);
    }

    public void addSavePic(String pic) {
        savePics.add(pic);
    }

    public List<String> getPics() {
        return pics;
    }

    public float getGoodScore() {
        return goodScore;
    }

    public void setGoodScore(float goodScore) {
        this.goodScore = goodScore;
    }

    public String getGoodsComment() {
        return goodsComment;
    }

    public String getComId() {
        return comId;
    }

    public void setComId(String comId) {
        this.comId = comId;
    }

    public String getComName() {
        return comName;
    }

    public void setComName(String comName) {
        this.comName = comName;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getMainPic() {
        return mainPic;
    }

    public void setMainPic(String mainPic) {
        this.mainPic = mainPic;
    }

    public void setGoodsComment(String goodsComment) {
        this.goodsComment = goodsComment;
    }

    public boolean isAnonymous() {
        return isAnonymous;
    }

    public void setAnonymous(boolean anonymous) {
        isAnonymous = anonymous;
    }

    public String getPicListStr() {
        if (savePics.size() == 0) return "";
        if (savePics.size() == 1) return savePics.get(0);
        StringBuilder str = new StringBuilder();
        for (int i = 0; i < savePics.size(); i++) {
            if (i != 0)
                str.append(",");
            str.append(savePics.get(i));
        }
        return str.toString();
    }
}
